﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using GestionaleLib.Controller;

namespace Leaf.View.Magazzino
{
    public partial class frmProdottiSottoScorta : Form
    {
        public frmProdottiSottoScorta()
        {
            InitializeComponent();
            Carica();
        }
        private void Carica()
        {
            Grid.DataSource = null;
            Grid.DataSource = new ctrlProdotti().SelezionaProdottiSottoScorta();
            FormattaGriglia();
        }
        private void FormattaGriglia()
        {
            if (Grid.DataSource != null)
            {
                Grid.Columns["Id"].Visible = false;
                Grid.Columns["Aliquota"].Visible = false;
                Grid.Columns["BarCode"].Visible = false;
                Grid.Columns["Prezzo"].Visible = false;
                Grid.Columns["MinimoMagazzino"].Visible = false;
            }
        }
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Carica();
        }
    }
}
